#include "common.h"

/* Log to a file */
void logMessage(const char* filename, const char * format, ...)
{
	char buffer[1024];
	va_list args;
	va_start (args, format);
	vsprintf (buffer,format, args);
	ofstream myfile;
	myfile.open ("/home/nctuns/TestLog.txt",ios::out | ios::app);
	myfile << "Time: "<< GetCurrentTime() << " "<<filename << ":: ";
	myfile << buffer;
	myfile.close();
	va_end (args);
}
